<html>
<head><meta charset="utf-8"><title>nvim-lsp cargoFeatures · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html">nvim-lsp cargoFeatures</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216457131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216457131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wojciech Polak <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216457131">(Nov 12 2020 at 11:40)</a>:</h4>
<p>Hey, is anyone here using <code>nvim-lsp</code> (native built-in LSP client for neovim 0.5.0 branch) with RA? If so, how can I enable features like <code>rust-analyzer.cargoFeatures.loadOutDirsFromCheck</code>? Is this json format VSCode thing?</p>



<a name="216457220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216457220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216457220">(Nov 12 2020 at 11:41)</a>:</h4>
<p><a href="https://github.com/neovim/nvim-lspconfig/pull/199">https://github.com/neovim/nvim-lspconfig/pull/199</a> should help</p>



<a name="216457816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216457816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216457816">(Nov 12 2020 at 11:49)</a>:</h4>
<p>And inside that dictionary, I think you need nested keys: <code>{cargoFeatures: { loadDirsFromCheck: true}}</code>, or whatever is the lua synta for this.</p>



<a name="216460353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216460353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wojciech Polak <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216460353">(Nov 12 2020 at 12:22)</a>:</h4>
<p>Ah thank you! Your MR directed me into <code>package.json</code> file with all settings defined there which I couldn't find. Apparently its no longer <code>cargoFeatures</code> but <code>cargo</code> and thats why it didnt work :)</p>



<a name="216460711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216460711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216460711">(Nov 12 2020 at 12:27)</a>:</h4>
<p>Heh, that explains this</p>



<a name="216460737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216460737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216460737">(Nov 12 2020 at 12:27)</a>:</h4>
<p>alos, urgh, the settings situation is bad -- only VS Code has any semblance of sane configuration, because this is done outside of LSP</p>



<a name="216460825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216460825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216460825">(Nov 12 2020 at 12:28)</a>:</h4>
<p>I need to allocate some time for editor-independent documentation for settings...</p>
<p>Or maybe I should go ahead and suggest and LSP extension for setting scheme....</p>



<a name="216498673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp%20cargoFeatures/near/216498673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim-lsp.20cargoFeatures.html#216498673">(Nov 12 2020 at 17:14)</a>:</h4>
<p><a href="https://github.com/neovim/nvim-lspconfig/issues/310">https://github.com/neovim/nvim-lspconfig/issues/310</a> btw, the root pattern should be overwritten with .git, or your cpu/mem will be exhausted when working with huge workspace like rustc. <span class="user-mention" data-user-id="133169">@matklad</span> is this a rust-analyzer issue with workspace?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>